package com.design3.graduatethesissys.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.design3.graduatethesissys.domain.PingJia;

/**
 * @author 作者 罗穆健:
 * @version 创建时间：2020年1月3日 下午5:35:25 类说明
 */
@Mapper
public interface ChuqiMapper {

	@Select("select pj_py,pj_bysjwcqk,pj_bysjwcqk_dj,pj_wcqk,pj_wcqk_dj,pj_bgxzsp,"
			+ "pj_bgxzsp_dj from pingjia where stu_id = #{stu_id} and pj_status=#{pj_status} ;")
	List<PingJia> pingJiList(String stu_id, String pj_status);

	@Insert("INSERT INTO pingjia (stu_id, pj_py, pj_bysjwcqk, pj_bysjwcqk_dj, pj_wcqk, pj_wcqk_dj, pj_bgxzsp, pj_bgxzsp_dj, pj_status) "
			+ "VALUES (#{stu_id}, #{pj_py}, #{pj_bysjwcqk}, #{pj_bysjwcqk_dj}, #{pj_wcqk}, #{pj_wcqk_dj}, #{pj_bgxzsp}, #{pj_bgxzsp_dj}, #{pj_status})")
	void savePingjia(PingJia pingjia);
	
	@Update("update student set stu_status = #{stu_status} where stu_id = #{stu_id}")
	void updateSstatus(@Param("stu_status")String stu_status, @Param("stu_id")String stu_id);
}
